#ifndef __ETH_CONNCET_H_
#define __ETH_CONNECT_H_

#include <stdio.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_netif.h"
#include "esp_eth.h"
#include "esp_eth_mac.h"
#include "esp_event.h"
#include "esp_log.h"
#include "driver/gpio.h"
#include "driver/spi_master.h"



#define CONFIG_EXAMPLE_SPI_ETHERNETS_NUM 1
#define CONFIG_EXAMPLE_USE_W5500 1
#define ETH_SPI_HOST SPI3_HOST

#define ETH_SPI_SCLK_GPIO 21
#define ETH_SPI_MOSI_GPIO 13
#define ETH_SPI_MISO_GPIO 14
#define SPI_CS 48
#define SPI_INT 12

// #define ETH_SPI_SCLK_GPIO 14
// #define ETH_SPI_MOSI_GPIO 13
// #define ETH_SPI_MISO_GPIO 12
// #define SPI_CS 48
// #define SPI_INT 21

#define SPI_PHY_ADDR 1
#define SPI_PHY_RST -1

extern bool eth_connection_flag;


void eth_connect(void);

//esp_eth_handle_t eth_handle_spi[CONFIG_EXAMPLE_SPI_ETHERNETS_NUM] = { NULL };
esp_eth_mac_t *mac_spi[1];

#endif



